import { defHttp } from '@/utils/http/axios';

// 查询设备版本列表
export function deviceVersionList(deviceTypeId) {
  return defHttp.post({
    url: '/sys/device/version/list/' + deviceTypeId,
    method: 'post',
  });
}

// 查询设备版本详情
export function deviceVersionDetails(id) {
  return defHttp.post({
    url: '/sys/device/version/details/' + id,
    method: 'post',
  });
}

// 删除设备版本
export function deviceVersionDelete(id) {
  return defHttp.post({
    url: '/sys/device/version/delete/' + id,
    method: 'post',
  });
}

// 下载apk
export function deviceVersionDownload(id) {
  return defHttp.post({
    url: '/sys/device/version/download/' + id,
    method: 'post',
  });
}

// 修改设备版本信息
export function deviceVersionUpdate(data) {
  return defHttp.post({
    url: '/sys/device/version/update',
    method: 'post',
    data: data,
  });
}

// 保存设备版本
export function deviceVersionSave(data) {
  return defHttp.post({
    url: '/sys/device/version/save',
    method: 'post',
    data: data,
  });
}
// 设备版本审批
export function deviceVersionApproval(data) {
  return defHttp.post({
    url: '/sys/device/version/approval',
    method: 'post',
    data: data,
  });
}
